<div class="main-panel">
	<div class="table-container">
		<div class="table-control">
			<div class="btn-group" role="group">
				<button class="btn btn-default" type="button"
					ng-click="data.addHotel()">添加酒店</button>
				<button class="btn btn-default" type="button"
					ng-click="data.deleteHotels()">刪除酒店</button>
			</div>
			<div class="search-control">
				<input type="text" class="form-control" ng-model="data.search"
					placeholder="輸入内容可以過濾">
			</div>
		</div>
		<div class="table-body">
			<table class="table">
				<thead>
					<tr>
						<th><nice-checkbox nice-model="data.chooseAll"></nice-checkbox></th>
						<th>ID</th>
						<th>酒樓名稱</th>
						<th>聯係人</th>
						<th>聯係電話</th>
						<th>郵箱</th>
						<th>地址</th>
					</tr>
				</thead>
				<tbody>
					<tr
						ng-repeat="hotel in data.hotelList | filter: data.search | limitTo: data.countPerPage: data.startIndex"
						ng-click="data.enterHotelDetail(hotel.id)">
						<td><nice-checkbox nice-model="hotel.$$selected"></nice-checkbox></td>
						<td ng-click="data.goDetail(hotel.id)">{{::hotel.id}}</td>
						<td><a ng-click="data.goDetail(hotel.id)">{{::hotel.name}}</a><span
							class="glyphicon glyphicon-thumbs-up" ng-if="hotel.$$recommend"></span></td>
						<td ng-click="data.goDetail(hotel.id)">{{::hotel.contact}}</td>
						<td ng-click="data.goDetail(hotel.id)">{{::hotel.telephone}}</td>
						<td ng-click="data.goDetail(hotel.id)">{{::hotel.email}}</td>
						<td ng-click="data.goDetail(hotel.id)">{{::hotel.address}}</td>
					</tr>
					<tr ng-if="!data.hotelList||data.hotelList.length === 0" class="no-item-row">
						<td colspan="7">沒有酒店</td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="table-pagination">
			<ul uib-pagination items-per-page="data.countPerPage"
				max-size="data.maxCount" total-items="data.hotelList.length"
				ng-model="data.page" ng-change="data.changePage()"
				previous-text="前一頁" next-text="后一頁"></ul>
		</div>
	</div>
</div>